import { reqGoodsList } from "@/api"

const actions = {
    async getGoods({ commit, state, dispatch, getters }, payload) {
        const result = await reqGoodsList(payload)
        if (result.code == 200) {
            commit('GETGOODS', result.data)
        }

    }
}
const mutations = {
    GETGOODS(state, goods) {
        state.goods = goods
    }
}

const state = {
    goods: {}
}

const getters = {

}
export default {
    state,
    mutations,
    actions,
    getters
}